//CRUD SQL语句
var sql = {
    insert: 'INSERT INTO content(title ,description ,content ,gmt_created) VALUES(?,?,?,?)',
    insertTag: 'INSERT INTO tags(name ,description ,gmt_created) VALUES(?,?,?)',
    update: 'update user set nick_name=?, email=?, github=? where id=?',
    delete: 'delete from user where id=?',
    queryById: 'select * from content where id=?',
    queryAll: 'select * from content Order By gmt_created Desc',
    queryTagAll: 'select * from tags Order By gmt_created Desc',
    queryByName: 'select * from user where Name=?',
    queryByTitle:'select * from content where title like ?',
    lists:'select count(*) from content;select * from content Order By gmt_created Desc limit ?,?;',
    num:'select count(*) from content',
    queryPage:'select * from content Order By gmt_created Desc limit ?,?;'
}

module.exports = sql;
